package org.streets.eis.component.model;

import java.util.Map;

import org.apache.wicket.model.IModel;

public class MapKeyModel<K,V> implements IModel<V>{
	
	private static final long serialVersionUID = 1L;
	
	private K key;
	
	private Map<K,V> target;
	
	public MapKeyModel(Map<K,V> map, K key) {
		this.target = map;
		this.key = key;
	}

	public V getObject() {
		return target.get(key);
	}

	public void setObject(V object) {
		target.put(key, object);
	}

	public void detach() {	
	}	
}
